import axios from '../axios'
import {ADMINS} from './consts'
export default{
  //获取
   getAdmins(){
      return  axios({
        url:ADMINS+'/getAdmins',
        method:'get',
      })
  },
    addAdmins(data){
        return axios({
            url: ADMINS+"/addAdmins",
            method:"post",
            data
        })
    },
    //删除管理员
    delAdmins(data){
        return axios({
            url:ADMINS+"/delAdmins",
            method:"post",
            data
        })
    },
    //获取单个管理员
    getAdminById(data){
        return axios({
            url:ADMINS + "/getAdminById",
            method:"post",
            data
        })
    },
    //修改管理员信息
    changeAdmins(data){
        return axios({
            url:ADMINS + "/changeAdmins",
            method:"post",
            data
        })
    },
    // 改变管理员权限
    changeAdminsCode(data){
        return axios({
            url:ADMINS + "/changeAdminsCode",
            method:"post",
            data
        })
    }


}
